import React from 'react';
import SearchInput from '../../../components/SearchInput';
import './style.less';

const HomeSearch = ({city, onClickCity}) => {
  const handleSearch = (keyword) => {
    console.log('search => type: all; keyword: ', keyword)
  }
  return (
    <div className="home-search">
      <aside onClick={onClickCity}>
        {city}&nbsp;<i className="icon iconfont icon-moreunfold"/>
      </aside>
      <section>
        <SearchInput onSearch={handleSearch}/>
      </section>
      <aside>
        <i className='icon iconfont icon-accountfilling'/>
      </aside>
    </div>
  )
}

export default HomeSearch;
